<% content_for :title do %><%= @category.name %><% end %>

<p>
  <%= category_breadcrumbs(@category) %>
</p>

<% if @category.children.size > 0 %>
<h2>Sub-categorie&euml;n</h2>
<%= render :partial => 'categories/list', :locals => { :categories => @category.children } %>

<% end %>

<h2>Producten</h2>
<% if @category.nested_products.size > 0 then%>
	<table>
	<% @products.each do |@product| %>
  		<%= render :partial => 'products/list_product', :locals => {:product => @product} %>
	<% end %>
	</table>

	<br />
	<% if @indices[0] > -1 then%>
		<%= link_to 'vorige', list_products_in_category_page_path(:id => @category, :page => @indices[0])%>
	<%end%>
	<% if @indices[1] != nil then%>
		<%= link_to 'volgende', list_products_in_category_page_path(:id => @category, :page => @indices[1])%>
	<%end%><br />

<% else %>
Er zitten geen producten in deze categorie.
<% end %>
</head>

